<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.etc.myblog.entity.User"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/jquery1.4.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/bioV4.min.js"></script>
<script type="text/javascript"src="${pageContext.request.contextPath}/resource/js/jquery.lazyload.mini.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/function.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/list.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/biobox.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resource/css/basic.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resource/css/list1.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resource/css/login.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resource/css/comment.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/resource/css/biobox2.css" />

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resource/css/nav_login_head.css" />

</head>
<body>
	<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/borsertocss.js">
		
	</script>
	<!-- 判断在IE9以下浏览器中根据像素的不同而设置的样式 -->



	<div class="navbar navbar-fixed-top"
		style="_position: relative;_z-index: 10000;">
		<div class="navbar-inner">
			<div class="container">
				<div style="ont-family:Arial; font-size:14px;">
					<ul class="nav">
						<li class=""><a href="${pageContext.request.contextPath}/ArticleSer?tag=home"><b>首页</b></a></li>
						<li class=""><a href="${pageContext.request.contextPath}/ScolumnSer"><b>博客专栏</b></a></li>
						<li class=""><a href="${pageContext.request.contextPath}/UserSer?tag=author"><b>博客专家</b></a></li>
						<li class=""><a href="${pageContext.request.contextPath}/RankSer"><b>博客排行榜</b></a></li>
						<li class=""><a href="${pageContext.request.contextPath}/ArticleSer"><b>我的博客</b></a></li>
					</ul>
				</div>
				<!--/.nav-collapse -->
				<ul id="userInfo" class="nav pull-right login-none nav-tips">
					<li class="ie6png divider-vertical"
						style="_width: 30px;_height: 40px;_background: url(${pageContext.request.contextPath}/resource/images/icons.png) no-repeat 10px -106px;"><a
						class="dropdown-toggle clearfix" style="padding: 7px 5px;"><img
							class="logo-before pull-left"
							src="/MyBlog/resource/images/avatar-icon.png" /></a></li>
				</ul>

				<ul id="Relog" class="nav pull-right pl-20 myul">
					<li class=""><a href="${pageContext.request.contextPath}/user/userRegister.jsp">注册</a></li>
					<li class="l10"><a href="${pageContext.request.contextPath}/user/userLogin.jsp">登录</a></li>
				</ul>
				
				
			<div class="member">
			<p>会员中心</p>
			<ul>
			 <%
			 User user = new User();
			 if (session.getAttribute("user")!=null) {
  				 user = (User)session.getAttribute("user");
				 }
 		 	%>
				<li style="list-style:none">  欢迎您，<%=user.getUserName() %>
					</li>
				<li style="list-style:none">
					<img src="${pageContext.request.contextPath}/resource/images/nav_login_huiyuan1.png" alt="">
					<a href="${pageContext.request.contextPath}/UserSer?tag=center">个人主页</a>
				</li>
				<li style="list-style:none">
					<img src="${pageContext.request.contextPath}/resource/images/nav_login_huiyuan1.png" alt="">
					<a href="${pageContext.request.contextPath}/UserSer?tag=toedit">修改资料</a>
				</li>
				<li style="list-style:none">
					<img src="${pageContext.request.contextPath}/resource/images/nav_login_huiyuan1.png" alt="">
					<a href="${pageContext.request.contextPath}/user/userPwdModify.jsp">修改密码</a>
				</li>
			<a href="${pageContext.request.contextPath}/UserSer?tag=logout" 
			style="display: block;width: 100%;height: 25px;margin: 1.5em 0 0;font-size: 18px;
   					 text-align: center;color: #FFFFFF;line-height: 25px; background: #1F6ACF;-webkit-font-smoothing: antialiased;
   					 -moz-osx-font-smoothing: grayscale;">退出登录</a>
</ul>
		</div>
<!-- 点击登录,判断是否存在session,若存在,下滑什么鬼框
	  登出,把注册|登录显示,把用户信息和什么鬼框隐藏
 -->
<script type="text/javascript">
$(function() {
	/*登录*/
	$("#userInfo").click(function(){
		var name = "${sessionScope.user}";
		if(name != "") {
			$(".member").slideToggle(300);
		}
	});
	
	/*登出*/
	$(".logoutBtn").click(function(){
		$("#Relog").css('display','block');
		$("#userInfo").css('display','none');
		$(".member").css('display','none');
	});

});
</script>
		
				
			</div>
		</div>
	</div>
<!-- 这是判断是否登录的信息，需要用到jquery1.4.js -->
<script type="text/javascript">
	$(function getUser(){
 		var name = "${sessionScope.user}";
		if(name != "") {
			$("#Relog").css('display','none');
			$("#userInfo").css('display','block');
		}
	});
	</script>
	<!--头部代码结束-->
</body>
</html>
